import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import dataV from '@jiaminghi/data-view'

import 'lib-flexible/flexible'

Vue.use(dataV)
Vue.config.productionTip = false

Vue.filter("fromtime",(val)=>{
  // console.log(val);
  let time = new Date(val).getTime()
  let Y = new Date(time).getFullYear()
  let M = (new Date(time).getMonth()+1+"").padStart(2,"0")
  let D = (new Date(time).getDate()+"").padStart(2,"0")
  let hh = (new Date(time).getHours()+"").padStart(2,"0")
  let mm = (new Date(time).getMinutes()+"").padStart(2,"0")
  let ss = (new Date(time).getSeconds()+"").padStart(2,"0")
  return `${Y}-${M}-${D} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
